package com.ruoyi.zhjd.collect.modules.piece.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.zhjd.collect.modules.piece.dto.CollectPieceDto;
import com.ruoyi.zhjd.collect.modules.piece.dto.PieceAndDosageDto;
import com.ruoyi.zhjd.collect.modules.piece.dto.StatisticsPieceDto;
import com.ruoyi.zhjd.collect.modules.piece.entity.CollectPieceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 盘信息
 */
@Mapper
public interface LCollectPieceMapper extends BaseMapper<CollectPieceEntity> {

    /**
     * 获取分页列表数据
     *
     * @param page   分页信息
     * @param params 查询条件
     * @return 分页列表数据
     */
    IPage<CollectPieceDto> query(IPage<CollectPieceDto> page, @Param("params") Map<String, Object> params);

    IPage<PieceAndDosageDto> queryPage(IPage<PieceAndDosageDto> page, @Param("params") Map<String, Object> params);

    List<CollectPieceDto> query(@Param("params") Map<String, Object> params);

    /**
     * 盘数据统计
     *
     * @param params 查询条件
     */
    IPage<StatisticsPieceDto> statisticsPiece(IPage<StatisticsPieceDto> page, @Param("params") Map<String, Object> params);
}
